<template>
	<view>
		<!-- 名片样式 -->
		<view class="createCard" v-if="userInfo.id">
			<default-card :userInfo="userInfo" v-if="userInfo.style=='0'" @goToPreviewMyPage='goToPreviewMyPage'
				:showReviewMark="true"></default-card>
			<card-style1 :userInfo="userInfo" v-else-if="userInfo.style=='1'" @goToPreviewMyPage='goToPreviewMyPage'
				:showReviewMark="true"></card-style1>
			<card-style2 :showReviewMark="true" :userInfo="userInfo" v-else-if="userInfo.style=='2'"
				@goToPreviewMyPage='goToPreviewMyPage'>
			</card-style2>
			<card-style4 :showReviewMark="true" :userInfo="userInfo" v-else-if="userInfo.style=='3'"
				@goToPreviewMyPage='goToPreviewMyPage'>
			</card-style4>
			<card-style5 :showReviewMark="true" :userInfo="userInfo" v-else-if="userInfo.style=='4'"
				@goToPreviewMyPage='goToPreviewMyPage'>
			</card-style5>
			<default-card :userInfo="userInfo" bgStyle="2" v-else-if="userInfo.style=='5'"
				@goToPreviewMyPage='goToPreviewMyPage' :showReviewMark="true"></default-card>
			<card-style6 :showReviewMark="true" :userInfo="userInfo" v-else-if="userInfo.style=='6'"
				@goToPreviewMyPage='goToPreviewMyPage'>
			</card-style6>
			<default-card :userInfo="userInfo" bgStyle="3" v-else-if="userInfo.style=='7'"
				@goToPreviewMyPage='goToPreviewMyPage' :showReviewMark="true"></default-card>
			<!-- 默认名片 -->
			<default-card :userInfo="userInfo" v-else></default-card>
		</view>
		<view class="createCard" v-if="!userInfo.id">
			<default-create-card></default-create-card>
		</view>
	</view>
</template>

<script>
	import defaultCreateCard from '@/components/cardStyle/defaultCreateCard.vue'
	import cardStyle1 from '@/components/cardStyle/cardStyle1.vue'
	import cardStyle2 from '@/components/cardStyle/cardStyle2.vue'
	import cardStyle4 from '@/components/cardStyle/cardStyle4.vue'
	import cardStyle5 from '@/components/cardStyle/cardStyle5.vue'
	import cardStyle6 from '@/components/cardStyle/cardStyle6.vue'
	import defaultCard from '@/components/cardStyle/defaultCard.vue'
	export default {
		components: {
			cardStyle1,
			cardStyle2,
			cardStyle4,
			cardStyle5,
			cardStyle6,
			defaultCard,
			defaultCreateCard,
		},
		props: {
			userInfo: {
				type: Object,
			}
		},
		methods: {
			goToPreviewMyPage() {
				this.$emit('goToPreviewMyPage')
			}
		}
	}
</script>

<style>
</style>